
export class RampartSample<T extends IFVector2 = IFVector2> implements ISample<T>
{
    private _obj:T;
    private _nabs:RampartSample[]=[];
    constructor(line:T)
    {
        this._obj = line;
    }
    isInRange(sam: RampartSample, r: number): boolean
    {
        const distance = Math.abs( sam.Data.x - this.Data.x) + Math.abs( sam.Data.y- this.Data.y);
        if(distance<=r)
        {
            return true;
        }

        return false;
        // throw new Error("Method not implemented.");
    }
    addNab(sam: RampartSample): void
    {
        // throw new Error("Method not implemented.");
        this._nabs.push(sam);
    }
    isCore(): boolean
    {
        throw new Error("Method not implemented.");
    }
    getNabs(): RampartSample[]
    {
        return this._nabs;
        // throw new Error("Method not implemented.");
    }
    get Data(): Readonly< T>
    {
        return this._obj;
    }

}
